// 参数回送
#include <stdio.h>
void main(int argc, char *argv[])
{
    while (--argc > 0)
        printf("%s%c", *++argv, (argc > 1) ? ' ' : '\n');
}

// 获取本地时间
#include <stdio.h>
#include <time.h>
#include <windows.h>

void main()
{
    time_t Curtime = (time_t)0;
    struct tm *RetTime = NULL;

    while (1)
    {
        time(&Curtime);
        RetTime = localtime(&Curtime);
        printf("\r%04d-%02d-%02d %02d:%02d:%02d 星期%d",
               RetTime->tm_year + 1900,
               RetTime->tm_mon + 1,
               RetTime->tm_mday,
               RetTime->tm_hour,
               RetTime->tm_min,
               RetTime->tm_sec,
               RetTime->tm_wday);

        Sleep(100);
    }
}
